Extension::CurlSetOpt Method

Syntax

.SetOpt as L (option as C, value as A)

Arguments

option

Character

value

Any type

Description

Sets an option .

Supported CURL Options

The following CURL options are supported. For more information about these options, see the CURL documentation.

ACCEPT_ENCODING

Sets the contents of the Accept-Encoding: header sent in an HTTP request.

ACCEPTTIMEOUT_MS

Timeout for waiting for the server's connect back to be accepted.

ADDRESS_SCOPE

IPv6 scope for local addresses.

APPEND

Append to remote file. Numeric.

AUTOREFERER

Sets the Referer: header field in HTTP requests.

CAINFO

Sets CA certificate bundle.

CAPATH

Sets Path to CA certificate bundle.

CERTINFO

Set to 1 to enable certificate chain info gatherer.

COPYPOSTFIELDS

Send a POST with this data - and copy it.

COOKIE

Set Cookie(s) in the format NAME=CONTENTS

COOKIEFILE

Set File to read cookies from.

COOKIEJAR

Set File to write cookies to.

COOKIELIST

Add or control cookies

COOKIESESSION

Start a new cookie session

CONNECT_ONLY

Only connect, no data sent.

CONNECTTIMEOUT

Timeout for the connection phase.

CONNECTTIMEOUT_MS

Timeout for the connection phase expressed in milliseconds.

CUSTOMREQUEST

Set Cusotm request/method (i.e. PUT/PATCH/DELETE etc.)

DIRLISTONLY

Set to 1 tells the library to list the names of files ina directory.

DNS_CACHE_TIMEOUT

Timeout for DNS cache.

DNS_INTERFACE

Bind name resolves to this interface.

DNS_LOCAL_IP4

Bind name resolves to this IP4 address.

DNS_LOCAL_IP6

Bind name resolves to this IP6 address.

DNS_SERVERS

Set Preferred DNS servers.

EGDSOCKET

Identify EGD socket for entropy.

FAILONERROR

CURL call should fail on hTTP 4xx errors.

FILE

Set file (Pass a Extension::CurlFile)

FILETIME

Request file modification date and time.

FOLLOWLOCATION

Follow HTTP redirects.

FORBID_REUSE

Prevent subsequent connections from re-using this connection.

FRESH_CONNECT

Use a new connection for this request.

FTP_ACCOUNT

Send FTP ACCT command

FTP_ALTERNATIVE_TO_USER

Alternative to USER.

FTP_CREATE_MISSING_DIRS

Create missing directories on the remote server.

FTP_FILEMETHOD

Specify how to reach files.

FTP_RESPONSE_TIMEOUT

Timeout for FTP responses.

FTP_SKIP_PASV_IP

Ignore the IP address in the PASV response.

FTP_SSL_CCC

Set back to non-TLS again after authentication.

FTP_USE_EPRT

Set to 1 tells CURL to use EPRT command when doing active FTP downloads.

FTP_USE_EPSV

Set to 1 tells CURL to use EPSV command when doing passive FTP.

FTP_USE_PRET

Set to 1 tells CURL to send a PRET command before PASV.

FTPPORT

Set port FTP transfer will use in Active mode.

FTPSSLAUTH

Control how to do TLS (USE_SSL must be set.)

GSSAPI_DELEGATION

Disable GSS-API delegation.

HEADER

Include the header in the body output.

HTTP_CONTENT_DECODING

Disable Content decoding.

HTTP_TRANSFER_DECODING

Disable Transfer decoding.

HTTP_VERSION

Specify which HTTP version to use.

HTTPAUTH

Set HTTP server authentication methods.

HTTPGET

Do a HTTP GET request.

HTTPHEADER

Specify HTTP headers - pass a character array of header entries.

HTTPPOST

Specify multipart formpost HTTP POST, pass a property array.

HTTPPROXYTUNNEL

Tunnel through the HTTP proxy.

IGNORE_CONTENT_LENGTH

Ignore Content-Length for FTP transfers.

INFILE

Set infile for posting data to request (pass an Extension::CurlFile)

INFILESIZE

Set size of file being sent to endpoint.

INTERFACE

Bind name resolves to this interface.

IPRESOLVE

IP version to resolve to.

ISSUERCERT

Set Issuer certificate.

KEYPASSWD

Set Client key password.

KRBLEVEL

Set Kerberos security level.

LOCALPORT

Bind connection locally to this port.

LOCALPORTRANGE

Bind connection locally to port range.

LOGIN_OPTIONS

Login options string to use for the transfer.

LOW_SPEED_LIMIT

Low speed limit to abort transfer.

LOW_SPEED_TIME

Time to be below the speed to trigger low speed abort.

MAIL_AUTH

Authentication address.

MAIL_FROM

Address of the sender.

MAIL_RCPT

Address of the recipients.

MAXCONNECTS

Maximum number of connections in the connection pool.

MAXFILESIZE

Maximum file size to get.

MAXREDIRS

Maximum number of redirects to follow.

NETRC

Enable netrc parsing.

NETRC_FILE

Specify netrc filename.

NEW_DIRECTORY_PERMS

Mode for creating new remote directories.

NEW_FILE_PERMS

Mode for creating new remote files.

NOBODY

Do not get the body contents.

NOPROXY

Filter out hosts from proxy use.

PASSWORD

Specify password to use fro basic authentication

PORT

Port number to connect to.

POST

Issue a HTTP POST request.

POSTFIELDS

Send a POST with this data.

POSTFIELDSIZE

Set the size of the POSt data.

POSTREDIR

How to act on redirects after POST

PROGRESS

Hook to show progress (pass an Extension::CurlProgress.)

PROTOCOLS

Set Allowed protocols.

PROXY_TRANSFER_MODE

Add transfer mode to URL over proxy.

PROXYAUTH

HTTP proxy authentication methods.

PROXYPASSWORD

Set Proxy password.

PROXYPORT

Set Proxy port to use.

PROXYTYPE

Set Proxy Type

PROXYUSERNAME

Set Proxy user name.

PROXYUSERPWD

Set Proxy user name and password.

PUT

Issue a HTTP PUT request.

RANDOM_FILE

Provide source for entropy random data for SSL.

RANGE

Set range for getting partial response, in bytes format X-Y. E.g. "0-199"

REDIR_PROTOCOLS

Protocols to allow redirects to

REFERER

Set the Referer: header in the HTTP request.

RESUME_FROM

Offset in bytes that the transfer resumes from

RTSP_CLIENT_CSEQ

CSEQ number to issue for the next RTSP request.

RTSP_REQUEST

Type of RTSP request.

RTSP_SERVER_CSEQ

Set the CSEQ number to expect for the next RTSP Server Client request.

RTSP_SESSION_ID

Set the value of the current RTSP session ID for the handle.

RTSP_STREAM_URI

Set the stream URI.

RTSP_TRANSPORT

Set the value of Transport: header for this RTSP session.

SASL_IR

Enable SASL initial response

SOCKS5_GSSAPI_NEC

Socks5 GSSAPI NEC mode

SOCKS5_GSSAPI_SERVICE

Socks5 GSSAPI service name.

SSH_AUTH_TYPES

SSH authentication types.

SSH_HOST_PUBLIC_KEY_MD5

Set MD5 of host's public key.

SSH_KNOWNHOSTS

Filename containing known hosts.

SSH_PRIVATE_KEYFILE

Filename of the private key.

SSH_PUBLIC_KEYFILE

Filename of the public key.

SSL_CIPHER_LIST

List of ciphers to use for SSL connection.

SSL_OPTIONS

Control SSL behavior.

SSL_SESSIONID_CACHE

Cache or don't cache SSl session IDs.

SSL_VERIFYHOST

Verify the host name in the SSL certificate.

SSL_VERIFYPEER

Verify the SSL certificate.

SSLCERT

Set filename for the client certificate.

SSLCERTTYPE

Format of the certificate, either 'PEM' or 'DER'

SSLENGINE

Use identify with SSL engine.

SSLENGINE_DEFAULT

Set to 1 to mae the already specified crypto engine the default for all crypto operations.

SSLKEY

Filename of the private key.

SSLKEYTYPE

Specify format of the private key - 'PEM', 'DER' or 'ENG'.

SSLVERSION

Set SSL version.

TCP_KEEPALIVE

Enable TCP keep-alive

TCP_KEEPIDLE

Idle time before sending keep-alive

TCP_KEEPINTVL

Set interval between keep-alive probes.

TCP_NODELAY

Disable the Nagle algorithm.

TFTP_BLKSIZE

Set blocksize to use for TFTP data transmissions (default is 512)

TIMECONDITION

Make a time conditional request.

TIMEOUT

Timeout for the entire request.

TIMEOUT_MS

Timeout for the entire request in milliseconds.

TIMEVALUE

Time value for the time conditional request.

TLSAUTH_PASSWORD

Set TLS authentication password

TLSAUTH_TYPE

TLS authentication methods

TLSAUTH_USERNAME

TLS authentication user name

TRANSFER_ENCODING

Adds a request for compressed Transfer Encoding if supported by server.

TRANSFERTEXT

Set to 1 to use ASCII mode for FTP transfers.

UNRESTRICTED_AUTH

Do not restrict authentication to original host.

UPLOAD

Set to 1 to perform an upload.

URL

The URL endpoint to use.

USE_SSL

Use TSL/SSL

USERAGENT

Set the User-Agent: header in the HTTP request.

USERNAME

Set the user name.

USERPWD

Set the user name and password.

XOAUTH2_BEARER

Specify the OAuth 2.0 Bearer Access Tokent to use.